﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Model.Enums
{

    public enum Shixing
    {
        S, A, B, C
    }
    public static class ShixingExtension
    {
        public static decimal tovalue(this Shixing Shixing)
        {
            switch (Shixing)
            {
                case Shixing.S:
                    return 1.20M;
                case Shixing.A:
                    return 1.00M;
                case Shixing.B:
                    return 0.85M;
                case Shixing.C:
                    return 0.70M;
                default:
                    return 0;
            }
        }

        public static string tomark(this Shixing Shixing)
        {
            switch (Shixing)
            {
                case Shixing.S:
                    return "S";
                case Shixing.A:
                    return "A";
                case Shixing.B:
                    return "B";
                case Shixing.C:
                    return "C";
                default:
                    return string.Empty;
            }
        }
    }
}
